﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlMultiMenu.ascx.cs" Inherits="Usercontrol_ControlMultiMenu" %>
<%@ Import Namespace="webapp4U" %>

<%--<link rel="stylesheet" href='<%=ResolveUrl("~/Css/jquerycssmenu.css")%>' type="text/css" />
 <div id="myjquerymenu" class="jquerycssmenu">

                <ul>
                    <asp:Repeater ID="rpt_category" runat="server">
                        <ItemTemplate>
                    <li><a href="<%=Globals.ApplicationPath %><%# Eval("PageLink") %>"><%# Eval("MenuName")%></a>
                    <asp:Label Visible="false" ID="lblRoot" runat="server" Text='<%# Eval("MenuID")%>'>
                                </asp:Label>
                        <ul>
                          <asp:Repeater ID="rpt_subcategory" DataSourceID="SqlDataSource1" runat="server">
                                            <ItemTemplate>
                              <li><a href="<%=Globals.ApplicationPath %><%# Eval("PageLink") %>"><%# Eval("MenuName")%></a>
                               <asp:Label Visible="false" ID="lblRoot2" runat="server" Text='<%# Eval("MenuID")%>'>
                              </asp:Label>
                                <ul>
                                <asp:Repeater ID="rpt_subsubcategory" DataSourceID="SqlDataSource2" runat="server">
                              <ItemTemplate>
                                    <li><a href="<%=Globals.ApplicationPath %><%# Eval("PageLink") %>"><%# Eval("MenuName")%></a></li>
                                </ItemTemplate>
                     </asp:Repeater>
                                </ul>
                              </li>
                               <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                                                    ConnectionString="<%$ ConnectionStrings:SqlServices %>" 
                                                    SelectCommand="k_getMenuDirectSale3" SelectCommandType="StoredProcedure">
                                                    <SelectParameters>
                                                        <asp:ControlParameter ControlID="lblRoot2" Type="String" Name="ParentID" />
                                                        <asp:SessionParameter Name="TypeID" SessionField="TypeID" Type="String" />
                                                    </SelectParameters>
                                                </asp:SqlDataSource>
                           </ItemTemplate>
                     </asp:Repeater>
                        </ul>
                    </li>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                 ConnectionString="<%$ ConnectionStrings:SqlServices %>" 
                                SelectCommand="k_getMenuDirectSale2" SelectCommandType="StoredProcedure">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="lblRoot" Type="String" Name="ParentID" />
                                    <asp:SessionParameter Name="TypeID" SessionField="TypeID" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </ItemTemplate>
                     </asp:Repeater>
                </ul>
            
 </div>--%>

 <ul id="nav">
         <asp:Repeater ID="rpt_category" runat="server">
                        <ItemTemplate>
                    <li><a href="<%=Globals.ApplicationPath %><%# Eval("PageLink") %>"><%# Eval("MenuName")%></a>
                    <asp:Label Visible="false" ID="lblRoot" runat="server" Text='<%# Eval("MenuID")%>'>
                                </asp:Label>
              <ul>
                 <asp:Repeater ID="rpt_subcategory" DataSourceID="SqlDataSource1" runat="server">
                                            <ItemTemplate>
                              <li><a href="<%=Globals.ApplicationPath %><%# Eval("PageLink") %>"><%# Eval("MenuName")%></a>
                               <asp:Label Visible="false" ID="lblRoot2" runat="server" Text='<%# Eval("MenuID")%>'>
                              </asp:Label>
                      <ul>
                      
                         <asp:Repeater ID="rpt_subsubcategory" DataSourceID="SqlDataSource2" runat="server">
                              <ItemTemplate>
                                    <li><a href="<%=Globals.ApplicationPath %><%# Eval("PageLink") %>"><%# Eval("MenuName")%></a></li>
                                </ItemTemplate>
                        </asp:Repeater>

                      </ul>
                 </li>
                  <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                                                    ConnectionString="<%$ ConnectionStrings:SqlServices %>" 
                                                    SelectCommand="k_getMenuDirectSale3" SelectCommandType="StoredProcedure">
                                                    <SelectParameters>
                                                        <asp:ControlParameter ControlID="lblRoot2" Type="String" Name="ParentID" />
                                                        <asp:SessionParameter Name="TypeID" SessionField="TypeID" Type="String" />
                                                    </SelectParameters>
                                                </asp:SqlDataSource>
                           </ItemTemplate>
                     </asp:Repeater>
              </ul>
        </li>
         <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                 ConnectionString="<%$ ConnectionStrings:SqlServices %>" 
                                SelectCommand="k_getMenuDirectSale2" SelectCommandType="StoredProcedure">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="lblRoot" Type="String" Name="ParentID" />
                                    <asp:SessionParameter Name="TypeID" SessionField="TypeID" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </ItemTemplate>
                     </asp:Repeater>
</ul>

<style type="text/css">
  .display
  {
      float:right;
  }
  
  .LinkbtnLogout
  {
      padding-left:10px;
      margin-left:5px;
    }
</style>

<%--<a class="display" href="<%=Globals.ApplicationPath %>Page/Login/Default.aspx">
<img src="<%=Globals.ApplicationPath %>IconButton/Run.ico" />Đăng nhập</a> --%>
<asp:LinkButton ID="lbtnLogin" runat="server" PostBackUrl="~/Page/Login/Default.aspx">
    <img src="<%=Globals.ApplicationPath %>IconButton/Run.ico" />Đăng nhập</asp:LinkButton>
<asp:LinkButton CssClass="LinkbtnLogout" ID="lbtnLogout" runat="server" onclick="lbtnLogout_Click">Đăng xuất</asp:LinkButton>